package behavioral.state;

/**
 * @ClassName: AudioPlayer
 * @Description: 音乐播放器
 * @Author: liu-hao
 * @Date: 2023-04-12 09:29
 * @Version: 1.0
 **/
public class AudioPlayer {
    private State state;

    public AudioPlayer() {
        state = new PlayingState();
    }

    public void changeState(State state) {
        this.state = state;
    }

    public void pressPlay() {
        state.pressButton();
    }
}
